package com.yl.zqy.service.sys;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yl.zqy.common.Result;
import com.yl.zqy.dto.SysRoleUserDTO;
import com.yl.zqy.entity.sys.SysRole;
import com.yl.zqy.vo.common.IPageVo;
import com.yl.zqy.vo.user.AuthMenusByRole;
import com.yl.zqy.vo.user.AuthUsersByRole;

import java.util.List;

/**
 * <p>
 * 角色管理 服务类
 * </p>
 *
 * @author liang.yu
 * @since 2024-03-28
 */
public interface SysRoleService extends IService<SysRole> {

    Result<Boolean> insertRole(SysRole role);

    Result<Boolean> updateRole(SysRole role);

    Result<Boolean> updateRoleStatus(SysRole role);

    Result<IPageVo<SysRole>> roleByPage(int current, int size, String status, String query);

    Result<List<SysRoleUserDTO>> getRoleNoAuthorizeByUsers(String roleId, String query);

    Result<List<SysRoleUserDTO>> getRoleAuthorizeByUsers(String roleId, String query);

    Result<Boolean> roleAuthorizeUsers(AuthUsersByRole auth);

    Result<Boolean> roleAuthorizeMenus(AuthMenusByRole auth);

    Result<List<String>> getRoleByMenus(String roleId);

    List<String> getUserByRole(Object loginId);
}
